<template>
  <div class="test">
    <h1>日志分析2</h1>
    <br/>
    <!-- <Modal :visible="modalFlag" @onOk="handleOk" @cancel="handleCancel">
        <template v-slot:title>
            <h1>充值提示123</h1>
        </template>
        <template v-slot:body>
            <h3>您正在充值7000000欢乐豆是否确定?</h3>
        </template>
      </Modal>
    <el-button @click="showModal">点击显示模态框</el-button> -->
    <Dialog ref="stuDialog" :visible="dialogVisible" @ok="dialogOpen" @cancle="dialogClose"></Dialog>
    <el-button @click="showDialogModal">点击dialog</el-button>
  </div>

</template>

<script>
import * as api from "@/api/users.js";
import Modal from '@/components/Modal/index.vue'
import Dialog from "@/components/Dialog/index.vue";
// import 'animate.css'

let userinfo = JSON.parse(localStorage.getItem("userinfo"));
console.log(userinfo);
let areaname = userinfo.Response.Data.User.Area.AreaName;
let areaid = userinfo.Response.Data.User.Area.AreaId;
let userid = userinfo.Response.Data.User.UserId;
console.log("areaname,areaid,userid", areaname, areaid, userid);

export default {
  data() {
    return {
      modalFlag: false, // modal显示框
      dialogVisible: false, // dialog对话框
    };
  },
  mounted() {
    
  },
  components: {
    Modal,
    Dialog
  },
  methods: {
    //展示模态框
    showModal(){
      this.modalFlag = true;
    },
    handleOk(){
      this.modalFlag = false;
      console.log('确定了');
    },
    handleCancel(){
      this.modalFlag = false
      console.log('取消了');
    },
    //展示dialog对话框
    showDialogModal(){
      this.dialogVisible = true;
    },
    //点击dialog的确定按钮
    dialogOpen(formData){
      console.log(formData);
      this.dialogVisible = false;
      console.log('确定了');
    },
    dialogClose(){
      this.dialogVisible = false
      console.log('取消了');
    },
  }
};
</script>

<style lang="less">

</style>
